#ifndef __MEMORY_ESTIMATOR__
#define __MEMORY_ESTIMATOR__
#include <hash_set>
#include "../FastaReader.h"
#include "../Global.h"
#include "../KmerSet.h"
using namespace std;
using namespace stdext;

class MemoryEstimator
{
private:
	struct  hash_kmer
	{
		//		SPARSEHASH_HASH<CompressedKmer> hash_func;
		size_t operator() (const CompressedKmer kmer) const
		{
			return kmer.hash();
		}
	};	

	hash_set<CompressedKmer, hash_kmer> m_AllKmers;
	
	GCOUNT_T  kmerNum;
	GCOUNT_T  ReadSKmerList;
	GCOUNT_T  kmerInRead;
	GINT64  est_MemoryIncludeReadSet;
	GINT64  est_MemoryExcludeReadSet;
	bool verbose;
public:
	MemoryEstimator(AbstractReader& reader); // must be reference or you will get error c2248 if fstream object exists
	~MemoryEstimator();
	void printCountInfo();
	void printMemoryCandidate();
	void echoOff();	
	
	GCOUNT_T  ReadNum;
};

#endif
